import request from '@/utils/request'

export default {
  getChapterVideo(courseId) {
    return request({
      url: `/eduservice/edu-chapter/getChapterVideo/${courseId}`,
      method: 'get',
    })
  },
  // 添加章节
  addChapter(chapter) {
    return request({
      url: `/eduservice/edu-chapter/addChapter`,
      method: 'post',
      data: chapter,
    })
  },
  // 根据id查询章节
  getChapter(chapterId) {
    return request({
      url: `/eduservice/edu-chapter/getChapterInfo/${chapterId}`,
      method: 'get',
    })
  },
  // 修改章节
  updataChapter(chapter) {
    return request({
      url: `/eduservice/edu-chapter/updataChapter`,
      method: 'post',
      data: chapter,
    })
  },
  removeChapter(chapterId) {
    return request({
      url: `/eduservice/edu-chapter/${chapterId}`,
      method: 'delete',
    })
  },
}